import RequestV2 from "@/utils/requestV2";


export function create(data) {
  return RequestV2({
    url: "robot/ad-push-unit/create",
    data: data,
    method: "post"
  });
}

export function remove(id){
  return RequestV2({
    url: `robot/ad-push-unit/delete?id=${id}`,
    method: "post"
  })
}

export function update(data){
  return RequestV2({
    url: "robot/ad-push-unit/update",
    data: data,
    method: "post"
  })
}

export function getParam(id) {
  return RequestV2({
    url: `robot/ad-push-unit/getParam?id=${id}`,
    method: "get"
  });
}

export function options(lookMe){
  return RequestV2({
    url: `robot/ad-push-unit/options?lookMe=${lookMe}`,
    method: "get"
  })
}

export function typeOptions(){
  return RequestV2({
    url: 'robot/ad-push-unit/typeOptions',
    method: "get"
  })
}

export function page(data) {
  return RequestV2({
    url: "robot/ad-push-unit/page",
    params: data,
    method: "get"
  });
}

export function pushTask(data){
  return RequestV2({
    url: 'robot/ad-push-unit/pushTask',
    data: data,
    method: "post"
  })
}